﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Bird.Services.Projects;
using Bird.Models;
namespace Bird.Controllers
{
    public class HomeController : Controller
    {
        IProjectService _projectService;
        public HomeController(IProjectService projectService)
        {
            _projectService = projectService;
        }
        public ActionResult Index(int? page)
        {
            HomePageModel model = new HomePageModel()
            {
                HomePageProjects = _projectService.GetAllProjects(10, page ?? 1, null, null, null)
            };
        
            return View(model);
        }

    }
}
